package com.linzm.j2eetype.interceptingfilter06.filter;

import com.linzm.j2eetype.interceptingfilter06.Target;

/**
 * @Author zimingl
 * @Date 2023/4/16 16:35
 * @Description: FilterManager
 */
public class FilterManager {
    FilterChain filterChain;

    public FilterManager(Target target) {
        filterChain = new FilterChain();
        filterChain.setTarget(target);
    }

    public void setFilter(Filter filter) {
        filterChain.addFilter(filter);
    }

    public void filterRequest(String request) {
        filterChain.execute(request);
    }
}
